<?php


	$link=mysql_connect("localhost","root","");
	mysql_select_db("totus");
	$query="SELECT * FROM departamento WHERE Empresa_id_empresa='". $_POST['sel']."'";
	$consulta=mysql_query($query);
	$select="Selecciona Departamento:<br><form id='departa' name='departa' method='post'><select id='id_depa' name='id_depa' onchange='repre4();'><option value='0'>Selecciona</option>";
	while($row=mysql_fetch_array($consulta))
	{
		$select.="<option value='".$row[0]."'>".$row[2]."</option>";
	}
	$select.="</select></form><br>";
	echo $select;
	
	

?>
